/*
 * XML Type:  PaymentTransactionRequest
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PaymentTransactionRequest
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PaymentTransactionRequest(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PaymentTransactionRequestImpl extends net.ofx.types.x2003.x04.impl.AbstractTransactionRequestImpl implements net.ofx.types.x2003.x04.PaymentTransactionRequest
{
    
    public PaymentTransactionRequestImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PMTRQ$0 = 
        new javax.xml.namespace.QName("", "PMTRQ");
    private static final javax.xml.namespace.QName PMTMODRQ$2 = 
        new javax.xml.namespace.QName("", "PMTMODRQ");
    private static final javax.xml.namespace.QName PMTCANCRQ$4 = 
        new javax.xml.namespace.QName("", "PMTCANCRQ");
    
    
    /**
     * Gets the "PMTRQ" element
     */
    public net.ofx.types.x2003.x04.PaymentRequest getPMTRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentRequest)get_store().find_element_user(PMTRQ$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTRQ" element
     */
    public boolean isSetPMTRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTRQ$0) != 0;
        }
    }
    
    /**
     * Sets the "PMTRQ" element
     */
    public void setPMTRQ(net.ofx.types.x2003.x04.PaymentRequest pmtrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentRequest)get_store().find_element_user(PMTRQ$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentRequest)get_store().add_element_user(PMTRQ$0);
            }
            target.set(pmtrq);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTRQ" element
     */
    public net.ofx.types.x2003.x04.PaymentRequest addNewPMTRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentRequest)get_store().add_element_user(PMTRQ$0);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTRQ" element
     */
    public void unsetPMTRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTRQ$0, 0);
        }
    }
    
    /**
     * Gets the "PMTMODRQ" element
     */
    public net.ofx.types.x2003.x04.PaymentModRequest getPMTMODRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentModRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentModRequest)get_store().find_element_user(PMTMODRQ$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTMODRQ" element
     */
    public boolean isSetPMTMODRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTMODRQ$2) != 0;
        }
    }
    
    /**
     * Sets the "PMTMODRQ" element
     */
    public void setPMTMODRQ(net.ofx.types.x2003.x04.PaymentModRequest pmtmodrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentModRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentModRequest)get_store().find_element_user(PMTMODRQ$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentModRequest)get_store().add_element_user(PMTMODRQ$2);
            }
            target.set(pmtmodrq);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTMODRQ" element
     */
    public net.ofx.types.x2003.x04.PaymentModRequest addNewPMTMODRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentModRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentModRequest)get_store().add_element_user(PMTMODRQ$2);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTMODRQ" element
     */
    public void unsetPMTMODRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTMODRQ$2, 0);
        }
    }
    
    /**
     * Gets the "PMTCANCRQ" element
     */
    public net.ofx.types.x2003.x04.PaymentCancelRequest getPMTCANCRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentCancelRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentCancelRequest)get_store().find_element_user(PMTCANCRQ$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTCANCRQ" element
     */
    public boolean isSetPMTCANCRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTCANCRQ$4) != 0;
        }
    }
    
    /**
     * Sets the "PMTCANCRQ" element
     */
    public void setPMTCANCRQ(net.ofx.types.x2003.x04.PaymentCancelRequest pmtcancrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentCancelRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentCancelRequest)get_store().find_element_user(PMTCANCRQ$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentCancelRequest)get_store().add_element_user(PMTCANCRQ$4);
            }
            target.set(pmtcancrq);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTCANCRQ" element
     */
    public net.ofx.types.x2003.x04.PaymentCancelRequest addNewPMTCANCRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentCancelRequest target = null;
            target = (net.ofx.types.x2003.x04.PaymentCancelRequest)get_store().add_element_user(PMTCANCRQ$4);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTCANCRQ" element
     */
    public void unsetPMTCANCRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTCANCRQ$4, 0);
        }
    }
}
